package liuyuyang.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

@Data
@TableName("tb_user")
public class User {
    @TableId(value = "u_id", type = IdType.ASSIGN_UUID)
    private Integer uid;

    @TableField("user_name")
    private String username;   // 用户名
    private String password;  // 密码
    private Boolean gender;  // 性别
    private String image;  // 头像图片

    @TableField(exist = false)
    private List<Role> role = new ArrayList<>();

    @TableField(exist = false)
    private String oldPassword; // 旧密码

    @TableField(exist = false)
    private String newPassword; // 新密码
}